<template>
	<view>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			}
		},
		onReady() {
			this.scanFun()
		},
		methods: {
			scanFun() {
				uni.scanCode({
					scanType: "qrCode",
					success: function (res) {
							console.log('条码类型：' + res.scanType);
							console.log('条码内容：' + res.result);
							uni.redirectTo({
								url: "/pages/active/active"
							})
						},
					fail: function (err) {
						console.log("扫码失败：",err)
						uni.redirectTo({
							url: "/pages/active/active"
						})
					}	
				})
			}
		}
	}
</script>

<style>

</style>
